<?php
//包含连接数据库的公共文件
require_once("./conn.php");
    //获取地址栏传递的son
    //获取表单提交数据
    $son=$_POST["son"];
    $sname=$_POST["sname"];
    $sbirth=$_POST["sbirth"];
    $ssex=$_POST["ssex"];
    $sclass=$_POST["sclass"];
    $zon=$_POST["zon"];
   

    //构建插入SQL语句
    $sql="update insert_student set son='$son',sname='$sname',sbirth='$sbirth',ssex='$ssex',sclass='$sclass',zon='$zon' where son = '$son';";
    $set=mysqli_query($con,$sql);

    var_dump($set);

    
    // echo $set;
  if($set==1){
        echo "<script>alert('成功');location='show.php';</script>";
    }else{
        echo "<script>alert('失败');</script>";
    }


?>